package websocket

import (
	"net/http"
)

type DailOptions func(opt *dailOption)

type dailOption struct {
	pattern string
	header  http.Header
	scheme  string
	Discover
}

func newClientOptions(opts ...DailOptions) dailOption {
	o := dailOption{
		pattern: "/ws",
		header:  http.Header{},
		scheme:  "ws",
	}

	for _, opt := range opts {
		opt(&o)
	}
	return o
}

func WithClientDiscover(discover Discover) DailOptions {
	return func(opt *dailOption) {
		opt.Discover = discover
	}
}

func WithClientHeader(header http.Header) DailOptions {
	return func(opt *dailOption) {
		opt.header = header
	}
}
